package com.coolweather.android;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

import org.litepal.tablemanager.Connector;

public class MainActivity1<City> extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Log.d("11232322", "1211");
        Button createDatabase = (Button) findViewById(R.id.bt1);
        createDatabase.setOnClickListener((v) -> {
            Log.d("触发", "info");
            Connector.getDatabase();
        });

        Button addData = (Button) findViewById(R.id.bt2);
//        addData.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                City city = new City();
//                city.setId(1);
//                city.setCityName("绵阳");
//                city.setCityCode(2);
//                city.setProvinceId(4);
//                city.save();
//            }
//        });

    }
}